Implementing synchronization of state information betweeen instances of an application as well as between different applications in an efficient, scalable manner

ABSTRACT

A method, system and computer program product for implementing synchronization of state information in an efficient, scalable manner. A shared state server receives a request from a client device to access a scope containing state information. The scope is distributed over a partition(s) via the use of a “data grid” thereby increasing scalability. The shared state server relays the request to a data grid server responsible for maintaining the data grid comprised of an in-memory cache and partitions outside of the in-memory cache. The request includes a key associated with a value corresponding to the requested state information. The data grid server obtains the value associated with the key from its data grid and sends it to the shared state server to be relayed to the requesting client device. In this manner, the state information is stored in a scalable manner thereby improving the efficiency in synchronizing state information.

TECHNICAL FIELD

The present invention relates generally to state synchronization, andmore particularly to implementing synchronization of state informationbetween instances of an application as well as between differentapplications in an efficient, scalable manner.

BACKGROUND

Today, users may often use multiple computing devices, such as mobilecomputing devices and desktop computing devices. In addition, such usersmay utilize multiple instances of an application on these computingdevices. For example, instances of an e-mail application may be loadedonto a laptop computer, a smartphone and a desktop computer. In thisway, the user may have access to the same application and/or applicationdata on multiple devices. For instance, the user may check an e-mailaccount on the user's desktop computer at home and then later check thee-mail account on the user's smartphone while running errands.

As a result of having multiple instances of an application on multipledevices, the application state, such as application settings, for eachof the instances of the application needs to be synchronized in orderfor the user to be provided with a seamless and consistent experience.That is, the application state, such as application settings, for eachof the instances of the application needs to be synchronized in orderfor each application to perform consistently regardless of which devicethe user is using. For example, if the user configures a new e-mailaccount within an e-mail application on a laptop computer, then the newe-mail account should be reflected within the e-mail application on theuser's desktop computer. As a result, the application state for each ofthe instances of the application needs to be synchronized.

Currently, such instances of an application become synchronized bycreating an interface with a remote service (e.g., web services, such asJAX-RS services) and have those instances periodically synchronize inorder to maintain consistency. Unfortunately, such a synchronizationprocess occurs at unpredictable times. Furthermore, such asynchronization process may have unpredictable results depending onwhich application instance is synchronized first.

SUMMARY

In one embodiment of the present invention, a method for implementingsynchronization of state information in an efficient, scalable mannercomprises receiving from a client device an update to state informationof an application stored in a scope, where the scope is distributed overone or more partitions. The method further comprises determining whetherother instances of the application whose state information was updatedis being used by other client devices with access to the scope. Themethod additionally comprises notifying a first set of one or moreclient devices with access to the scope regarding the update to thestate information of the application in response to determining that oneor more other instances of the application are being used by the firstset of one or more client devices.

Other forms of the embodiment of the method described above are in asystem and in a computer program product.

The foregoing has outlined rather generally the features and technicaladvantages of one or more embodiments of the present invention in orderthat the detailed description of the present invention that follows maybe better understood. Additional features and advantages of the presentinvention will be described hereinafter which may form the subject ofthe claims of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

A better understanding of the present invention can be obtained when thefollowing detailed description is considered in conjunction with thefollowing drawings, in which:

FIG. 1 illustrates a network system configured in accordance with anembodiment of the present invention;

FIG. 2 illustrates a hardware configuration of a shared state server anda data grid server in accordance with an embodiment of the presentinvention;

FIG. 3 illustrates the data grid server using a routing table fordetermining whether the requested state information is stored in thein-memory cache of the data grid server or outside of the in-memorycache in accordance with an embodiment of the present invention.

FIGS. 4A-4B are a flowchart of a method for implementing synchronizationof state information between instances of an application as well asbetween different applications in an efficient, scalable manner inaccordance with an embodiment of the present invention.

DETAILED DESCRIPTION

The present invention comprises a method, system and computer programproduct for implementing synchronization of state information in anefficient, scalable manner. In one embodiment of the present invention,a shared state server receives a request from a client device to accessa shared state scope containing state information. The shared statescope is distributed over one or more partitions via the use of a “datagrid” thereby increasing scalability. The request received from theclient device is relayed to a server, referred to herein as the “datagrid server,” by the shared state server, where the data grid server isresponsible for maintaining the data grid comprised of an in-memorycache and partitions outside of the in-memory cache. The request mayinclude a key associated with a value corresponding to the requestedstate information. A determination is made by the data grid server usinga routing table as to whether the requested state information is storedin the in-memory cache of the data grid server. The routing tableincludes a listing of keys and associated containers of the in-memorycache or associated partitions outside of the in-memory cache storingthe values associated with the keys. If the requested state informationis not stored in the in-memory cache (i.e., a cache miss), then the datagrid server identifies the partition outside of the in-memory cache,such as in a separate physical machine, storing the value associated thekey. The data grid server then obtains the value from the identifiedpartition and sends the obtained value to the shared state server to berelayed to the requesting client device. In this manner, the stateinformation can be stored in a scalable manner thereby improving theefficiency in synchronizing state information.

In the following description, numerous specific details are set forth toprovide a thorough understanding of the present invention. However, itwill be apparent to those skilled in the art that the present inventionmay be practiced without such specific details. In other instances,well-known circuits have been shown in block diagram form in order notto obscure the present invention in unnecessary detail. For the mostpart, details considering timing considerations and the like have beenomitted inasmuch as such details are not necessary to obtain a completeunderstanding of the present invention and are within the skills ofpersons of ordinary skill in the relevant art.

Referring now to the Figures in detail, FIG. 1 illustrates a networksystem 100 for practicing the principles of the present invention inaccordance with an embodiment of the present invention. Network system100 includes client devices 101A-101C (identified as “Client Device A,”“Client Device B,” and “Client Device C,” respectively, in FIG. 1)connected to a server (referred to herein as the “shared state server”)102 via a network 103. Client devices 101A-101C may collectively orindividually be referred to as client devices 101 or client device 101,respectively. Client device 101 may be any type of computing device(e.g., portable computing unit, Personal Digital Assistant (PDA),smartphone, laptop computer, mobile phone, navigation device, gameconsole, desktop computer system, workstation, Internet appliance andthe like) configured with the capability of connecting to network 103and consequently communicating with other client devices 101 and sharedstate server 102. Client devices 101 and shared state server 102 maycommunicate with each other using any protocol, including, but notlimited to, client devices 101 using a Representational State Transfer(REST) service to communicate with shared state server 102 and sharedstate server 102 using a push channel to communicate with clients 101.

FIG. 1 further illustrates a server, referred to herein as the “datagrid” server 104, connected to shared state server 102. In oneembodiment, the state information (e.g., application settings) is storedin multiple partitions or “shared state scopes” (also referred to assimply “scopes”). In one embodiment, each shared state scope isdistributed over one or more partitions via the use of a “data grid,”maintained by data grid server 104, thereby improving the scalabilityand availability of the state information as discussed in greater detailbelow in connection with FIG. 3. As will be discussed in further detailbelow, client devices 101 may issue a request to shared state server 102to access state information stored in a scope. Such a request will berelayed to data grid server 104 to access the requested stateinformation in its “data grid” comprised of an in-memory cache andpartitions outside of the in-memory cache. A description of the hardwareconfiguration of data grid server 104 is provided further below inconnection with FIG. 2.

In one embodiment, shared state server 102 is configured to synchronizethe state information in an efficient, scalable manner using the datagrid as discussed in further detail below. The state information (e.g.,user-wide state information, device-wide state information,application-specific state information) stored within the state scopecan be shared among the multiple instances of an application residing onmultiple client devices 101. For example, the state information in ashared state scope can be shared among an instance of an application ona laptop computer and an instance of the application on a desktopcomputer. Furthermore, the state information may include commoninformation (e.g., user information) that is shared among differentapplications. For example, common user information may be shared amongmultiple different applications thereby negating the requirement of eachapplication maintaining a separate copy of common user information. Inthis manner, the state information of an application having multipleinstances on multiple client devices 101 can be synchronized among theseclient devices 101 (e.g., between a mobile computing device and adesktop computing device) without requiring periodic synchronization asdiscussed further below. Furthermore, in this manner, the stateinformation containing common information used by different applicationscan be synchronized among these applications without requiring periodicsynchronization as discussed further below. A description of thehardware configuration of shared state server 102 is provided furtherbelow in connection with FIG. 2.

Network 103 may be, for example, a local area network, a wide areanetwork, a wireless wide area network, a circuit-switched telephonenetwork, a Global System for Mobile Communications (GSM) network,Wireless Application Protocol (WAP) network, a WiFi network, an IEEE802.11 standards network, various combinations thereof, etc. Othernetworks, whose descriptions are omitted here for brevity, may also beused in conjunction with system 100 of FIG. 1 without departing from thescope of the present invention.

While FIG. 1 illustrates three clients 101A-101C, a single shared stateserver 102 and a single data grid server 104, network system 100 mayinclude any number of clients 101, shared state servers 102 and datagrid servers 104. The embodiments of network system 100 are not to belimited in scope to the depiction of FIG. 1.

Referring now to FIG. 2, FIG. 2 illustrates a hardware configuration ofshared state server 102, data grid server 104 (FIG. 1) which isrepresentative of a hardware environment for practicing the presentinvention. Shared state server 102, data grid server 104 has a processor201 coupled to various other components by system bus 202. An operatingsystem 203 runs on processor 201 and provides control and coordinatesthe functions of the various components of FIG. 2. An application 204 inaccordance with the principles of the present invention runs inconjunction with operating system 203 and provides calls to operatingsystem 203 where the calls implement the various functions or servicesto be performed by application 204. Application 204 of shared stateserver 102 may include, for example, a program for implementingsynchronization of state information between instances of an applicationas well as between different applications in an efficient, scalablemanner as discussed further below in association with FIGS. 4A-4B.Application 204 of data grid server 104 may include, for example, anin-memory cache and a routing table used for determining whether therequested state information is stored in the in-memory cache or in apartition outside of the in-memory cache as discussed further below inconnection with FIG. 3 and FIGS. 4A-4B.

Referring again to FIG. 2, read-only memory (“ROM”) 205 is coupled tosystem bus 202 and includes a basic input/output system (“BIOS”) thatcontrols certain basic functions of shared state server 102, data gridserver 104. Random access memory (“RAM”) 206 and disk adapter 207 arealso coupled to system bus 202. It should be noted that softwarecomponents including operating system 203 and application 204 may beloaded into RAM 206, which may be shared state server's 102, data gridserver's 104 main memory for execution. Disk adapter 207 may be anintegrated drive electronics (“IDE”) adapter that communicates with adisk unit 208, e.g., disk drive. It is noted that the programs andapplications of the present invention may reside in disk unit 208 or inapplication 204.

Shared state server 102, data grid server 104 may further include acommunications adapter 209 coupled to bus 202. Communications adapter209 of shared state server 102, data grid server 104 interconnects bus202 with an outside network (e.g., network 103 of FIG. 1) therebyenabling shared state server 102 to communicate with client 101 (FIG. 1)and data grid server 104 and enabling data grid server 104 tocommunicate with shared state server 102.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” ‘module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or flash memory), a portablecompact disc read-only memory (CD-ROM), an optical storage device, amagnetic storage device, or any suitable combination of the foregoing.In the context of this document, a computer readable storage medium maybe any tangible medium that can contain, or store a program for use byor in connection with an instruction execution system, apparatus, ordevice.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the C programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of thepresent invention. It will be understood that each block of theflowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunction/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the function/acts specified in the flowchart and/or blockdiagram block or blocks.

As stated in the Background section, as a result of having multipleinstances of an application on multiple devices, the application state,such as application settings, for each of the instances of theapplication needs to be synchronized in order for the user to beprovided with a seamless and consistent experience. That is, theapplication state, such as application settings, for each of theinstances of the application needs to be synchronized in order for eachapplication to perform consistently regardless of which device the useris using. For example, if the user configures a new e-mail accountwithin an e-mail application on a laptop computer, then the new e-mailaccount should be reflected within the e-mail application on the user'sdesktop computer. As a result, the application state for each of theinstances of the application needs to be synchronized. Currently, suchinstances of an application become synchronized by creating an interfacewith a remote service (e.g., web services, such as JAX-RS services) andhave those instances periodically synchronize in order to maintainconsistency. Unfortunately, such a synchronization process occurs atunpredictable times. Furthermore, such a synchronization process mayhave unpredictable results depending on which application instance issynchronized first.

The principles of the present invention provide a means forsynchronizing the state information of an application among multipleinstances of the application without requiring periodic synchronizationin an efficient, scalable manner as discussed further below inconnection with FIGS. 3 and 4A-4B. Furthermore, the state informationcontaining common information used by different applications can besynchronized among these applications without requiring periodicsynchronization in an efficient, scalable manner as discussed furtherbelow in connection with FIGS. 3 and 4A-4B. FIG. 3 illustrates data gridserver 104 (FIGS. 1 and 2) using a routing table for determining whetherthe requested state information is stored in the in-memory cache of datagrid server 104 or outside of the in-memory cache. FIGS. 4A-4B are aflowchart of a method for implementing synchronization of stateinformation between instances of an application as well as betweendifferent applications in an efficient, scalable manner.

As discussed above, FIG. 3 illustrates data grid server 104 (FIGS. 1 and2) using a routing table for determining whether the requested stateinformation is stored in the in-memory cache of data grid server 104 orin a partition outside of the in-memory cache in accordance with anembodiment of the present invention.

Referring to FIG. 3, in conjunction with FIGS. 1-2, data grid server 104includes an in-memory cache 301 and a routing table 302. In oneembodiment, in-memory cache 301 and routing table 302 are softwarecomponents residing in application 204/disk unit 208. In one embodiment,in-memory cache 301 stores state information (e.g., user-wide stateinformation, device-wide state information, application-specific stateinformation) in a plurality of containers 303A-303L that may be run onseparate computer resources. Containers 303A-303L may collectively orindividually be referred to as containers 303 or container 303,respectively. In-memory cache 301 may include any number of containers303 and FIG. 3 is not to be limited in scope to the depicted number ofcontainers 303.

Containers 303 function as partitions that store portions of the data(state information) in in-memory cache 301. Combining the data stored byall of the containers 303 defines the total data stored by in-memorycache 301. In one embodiment, the memory address space associated withcontainers 303 is virtualized. That is, containers 303 may each map to aportion of the shared address space though they may be run by differentcomputing systems.

The “in-memory data grid” is comprised of in-memory cache 301 and thepartitions, and shards, if applicable, that may reside on separatephysical machines as discussed below. In one embodiment, the in-memorydata grid may use a hash function or key-value pairs to store data incontainers 303 and in the partitions, and shards, if applicable, thatmay reside on separate physical machines. In one embodiment, routingtable 302 stores the necessary information (e.g., a list of keys and theassociated containers 303 of in-memory cache 301 or associatedpartitions outside of in-memory data cache 301 storing the values (i.e.,the state information) associated with the keys) to determine if thestate information requested from a client device 101 is stored withinin-memory cache 301, and if so, which container 303 stores the requestedstate information. By having an in-memory cache 301 storing stateinformation, the requested state information may be obtained quicker ifthe requested state information is stored within in-memory cache 301(i.e., a cache hit). If, however, the requested state information is notstored within in-memory cache 301 (i.e., a cache miss), then data gridserver 104 will obtain the requested state information from thepartition and shard, if applicable, outside of in-memory cache 301identified in routing table 302 as discussed in further detail below.For example, routing table 302 may store a list of keys and theassociated partitions, and shards, if applicable, that store the value(i.e., the state information) associated with the key.

As discussed above, the state information is stored in multiplepartitions or “shared state scopes” (also referred to as simply“scopes”). In one embodiment, each shared state scope is distributedover one or more partitions, which may or may not reside on differentphysical machines, thereby increasing scalability. For example, thestate information in a scope may be distributed over “partition A” 304Aand “partition B” 304B of server 305A (identified as “server A” in FIG.3) and “partition C” 304C of server 305B (identified as “server B” inFIG. 3). Partitions 304A-304C may collectively or individually bereferred to as partitions 304 or partition 304, respectively.Furthermore, servers 305A-305B may collectively or individually bereferred to as servers 305 or server 305, respectively. While FIG. 3illustrates three partitions 304 distributed over two servers 305, eachscope may be distributed over any number of partitions 304 of any numberof servers 305. Furthermore, a scope may be distributed over one or morepartitions that may reside internally within data grid server 104 orexternally to data grid server 104 (such as via server(s) 305) or acombination of residing internally within or externally to data gridserver 104.

Furthermore, each partition 304 may be further partitioned into what isreferred to herein as “shards” providing further scalability. Forexample, partition 304C of server 305B includes shard A 306A and shard B306B. Shards 306A-306B may collectively or individually be referred toas shards 306 or shard 306, respectively. Each shard 306 may berepresentative of data stored on behalf of a company thereby providingmultitenancy. For example, shard 306A may store state information onbehalf of company A and shard 306B may store state information on behalfof company B. Each partition 304 may include any number of shards 306and FIG. 3 is not to be limited in scope to the depicted number ofpartitions 304, servers 305 and shards 306. A further description ofusing these components in connection with synchronizing the stateinformation of an application among multiple instances of theapplication without requiring periodic synchronization as well assynchronizing the state information containing common information amongdifferent applications that use the common information without requiringperiodic synchronization is discussed further below in connection withFIGS. 4A-4B.

Referring again to FIG. 3, in one embodiment, in-memory cache 301 storesdata objects in containers 303. That is, in-memory cache 301 may be anobject-oriented database rather than a relational database. A dataobject is an instance of a class defined by an object-orientedprogramming language, such as Java® or C++. A data object may containvarious attributes that are defined by the class.

Each container 303 in in-memory cache 301 may be a virtual machine(e.g., Java® Virtual Machine (JVM)) that stores one or more data objectsas illustrated in FIG. 3 (e.g., containers 303A-303L are identified as“VM1-VM12,” respectively, in FIG. 3, where “VM” refers to a virtualmachine). In one embodiment, in-memory cache 301 may be expanded byincreasing the number of virtual machines 303 and redistributing thedata amongst them.

Referring now to FIGS. 4A-4B, FIGS. 4A-4B are a flowchart of a method400 for implementing synchronization of state information betweeninstances of an application as well as between different applications inan efficient, scalable manner in accordance with an embodiment of thepresent invention.

Referring to FIG. 4A, in conjunction with FIGS. 1-3, in step 401, sharedstate server 102 receives a request from client device 101 (e.g., clientdevice 101A) to obtain state information stored in a shared state scope,where the scope is distributed over one or more partitions 304, whichmay or may not reside on different physical machines, thereby increasingscalability. In one embodiment, the request includes a key associatedwith a value corresponding to the requested state information.Furthermore, in one embodiment, the key is prefixed with a companynamespace thereby allowing multitenancy to be achieved as discussed infurther detail below.

In step 402, shared state server 102 relays the received request fromclient device 101 to data grid server 104. As stated above, the requestincludes a key associated with a value corresponding to the requestedstate information. For example, each key may be associated with acontainer 303 or partition 304 (e.g., partition 304A of server 305A)that stores the value associated with the key. Such information isstored in routing table 302 which is used by data grid server 104 todetermine the location of the requested state information.

In step 403, a determination is made by data grid server 104 as towhether the requested state information is stored in in-memory cache301. For example, routing table 302 may be used by data grid server 104to determine if the key provided in the request of step 401 isassociated with a container 303 of in-memory cache 301 or associatedwith a partition 304 outside of in-memory cache 301.

If the requested state information is stored in in-memory cache 301(i.e., a cache hit), then, in step 404, data grid server 104 retrievesthe value (i.e., the state information) stored in the container 303 ofin-memory cache 301 that is associated with the key provided in therequest of step 401. That is, if the key provided in the request of step401 is associated with a container 303 of in-memory cache 301, then, instep 404, data grid server 104 retrieves the value (i.e., the stateinformation) stored in the container 303 of in-memory cache 301 that isassociated with the key.

If, however, the requested state information is not stored in in-memorycache 301 (i.e., a cache miss), then, in step 405, data grid server 104identifies the partition 304 and shard 306, if applicable, storing thevalue associated the key provided in the request of step 401. In oneembodiment, the partition 304 and shard 306, if applicable, isidentified using routing table 302.

In step 406, data grid server 104 obtains the value from the identifiedpartition 304 and shard 306, if applicable, storing the value associatedthe key provided in the request of step 401. For example, referring toFIG. 3, if client device 101A requests the value of the key“com.companyA.UserName” where the key is prefixed with the companynamespace “com.companyA,” then data grid server 104 determines if thekey is associated with a container 303 in in-memory cache 301 usingrouting table 302. If routing table 302 indicates that the key is notassociated with a container 303 in in-memory cache 301, but instead, isassociated with a partition 304, such as partition 304C of server 305B,which has two shards 306, then data grid server 104 may determine whichshard 306 of partition 304C is associated with the company namespace(“company A”) prefixed to the key. For example, if shard 306A storesstate information on behalf of company A, then data grid server 104obtains the value from shard 306A. In this manner, the state informationcan be stored in a scalable manner, including achieving multitenancy,thereby improving the efficiency in synchronizing state information,where synchronization of the state information will be discussed infurther detail below.

Upon retrieving the value stored in container 303 of in-memory cache 301or upon obtaining the value from partition 304 and shard 306, ifapplicable, data grid server 104, in step 407, data grid server 104sends the retrieved value/obtained value to shared state server 102.

In step 408, shared state server 102 relays the retrieved value/obtainedvalue to the requesting client device 101 (e.g., client device 101A).

In step 409, shared state server 102 receives an update to the stateinformation by the requesting client device 101. For example, onceclient device 101 obtains the state information stored in the requestedshared state scope, client device 101 may perform various operations onthe state information. For example, if the user of client device 101configures a new e-mail account within an e-mail application, then thestate information directed to application settings is modified/updatedto reflect the new e-mail account. Client device 101 may immediatelysend the update to the state information to shared state server 102 orafter a period of time, such as in the case where the shared state scopeis defined as only being accessible by one client device 101 at a time.In such a scenario (where the shared state scope is defined as onlybeing accessible by one client device 101 at a time), client device 101may simply send all of its updates to shared state server 102 at oneparticular time.

In step 410, a determination is made by shared state server 102 as towhether there are other instances of the application, whose stateinformation was updated, being used by other client devices 101 withaccess to the requested shared state scope.

If there are other instances of the application, whose state informationwas updated, being used by other client devices 101 with access to therequested shared state scope, then, in step 411, server 102 notifiesthose client device(s) 101 with access to the requested shared statescope regarding the update to the state information for the application.

Referring now to FIG. 4B, in conjunction with FIGS. 1-3, if, however,there are no other instances of the application, whose state informationwas updated, being used by other client devices 101 with access to therequested shared state scope, then, in step 412, a determination is madeby shared state server 102 as to whether the updated state informationcorresponds to common information (e.g., user information) used bydifferent applications from client devices 101 with access to therequested shared state scope. That is, in step 412, a determination ismade by shared state server 102 as to whether the updated stateinformation corresponds to common information (e.g., user information)that is shared among different applications.

If the updated state information corresponds to common information thatis shared among different applications from client devices 101 withaccess to the requested shared state scope, then, in step 413, server102 notifies other client device(s) 101 with access to the requestedshared state scope regarding the update to the common information usedby other application(s) of the notified client device(s) 101.

If, however, the updated state information does not correspond to commoninformation that is shared among different applications from clientdevices 101 with access to the requested shared state scope, then, instep 414, shared state server 102 does not notify other client devices101 regarding such an update to the state information.

In some implementations, method 400 may include other and/or additionalsteps that, for clarity, are not depicted. Further, in someimplementations, method 400 may be executed in a different orderpresented and that the order presented in the discussion of FIGS. 4A-4Bis illustrative. Additionally, in some implementations, certain steps inmethod 400 may be executed in a substantially simultaneous manner or maybe omitted.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

The invention claimed is:
 1. A computer program product for implementingsynchronization of state information in an efficient, scalable manner,the computer program product comprising a computer readable storagemedium having program code embodied therewith, the program codecomprising the programming instructions for: receiving from a clientdevice an update to state information of an application stored in ascope, wherein said scope is distributed over one or more partitions;determining whether other instances of said application whose stateinformation was updated is being used by other client devices withaccess to said scope; and notifying a first set of one or more clientdevices with access to said scope regarding said update to said stateinformation of said application in response to determining that one ormore other instances of said application are being used by said firstset of one or more client devices.
 2. The computer program product asrecited in claim 1, wherein the program code further comprises theprogramming instructions for: determining whether said updated stateinformation corresponds to common information used by differentapplications from said other client devices with access to said scope inresponse to determining that there are no other instances of saidapplication whose state information was updated being used by said otherclient devices with access to said scope.
 3. The computer programproduct as recited in claim 2, wherein the program code furthercomprises the programming instructions for: notifying a second set ofone or more client devices with access to said scope regarding saidupdate to said common information in response to determining that saidupdated state information corresponds to said common information that isshared among one or more different applications from said second set ofone or more client devices with access to said scope.
 4. The computerprogram product as recited in claim 3, wherein said first set of one ormore client devices corresponds to different client devices than saidsecond set of one or more client devices.
 5. The computer programproduct as recited in claim 3, wherein said first set of one or moreclient devices corresponds to the same client devices as said second setof one or more client devices.
 6. A system, comprising: a memory forstoring a computer program for implementing synchronization of stateinformation in an efficient, scalable manner; and a processor connectedto said memory, wherein said processor is configured to execute theprogram instructions of the computer program comprising: receiving froma client device an update to state information of an application storedin a scope, wherein said scope is distributed over one or morepartitions; determining whether other instances of said applicationwhose state information was updated is being used by other clientdevices with access to said scope; and notifying a first set of one ormore client devices with access to said scope regarding said update tosaid state information of said application in response to determiningthat one or more other instances of said application are being used bysaid first set of one or more client devices.
 7. The system as recitedin claim 6, wherein the program instructions of the computer programfurther comprise: determining whether said updated state informationcorresponds to common information used by different applications fromsaid other client devices with access to said scope in response todetermining that there are no other instances of said application whosestate information was updated being used by said other client deviceswith access to said scope.
 8. The system as recited in claim 7, whereinthe program instructions of the computer program further comprise:notifying a second set of one or more client devices with access to saidscope regarding said update to said common information in response todetermining that said updated state information corresponds to saidcommon information that is shared among one or more differentapplications from said second set of one or more client devices withaccess to said scope.
 9. The system as recited in claim 8, wherein saidfirst set of one or more client devices corresponds to different clientdevices than said second set of one or more client devices.
 10. Thesystem as recited in claim 8, wherein said first set of one or moreclient devices corresponds to the same client devices as said second setof one or more client devices.